Optimal. Leaf size=192 \[ \frac {(2 c d-b e) (-b e g-2 c d g+4 c e f) \tan ^{-1}\left (\frac {e (b+2 c x)}{2 \sqrt {c} \sqrt {d (c d-b e)-b e^2 x-c e^2 x^2}}\right )}{8 c^{3/2} e^2}+\frac {\sqrt {d (c d-b e)-b e^2 x-c e^2 x^2} (-b e g-2 c d g+4 c e f)}{4 c e^2}-\frac {g \left (d (c d-b e)-b e^2 x-c e^2 x^2\right )^{3/2}}{2 c e^2 (d+e x)} \]
________________________________________________________________________________________
Rubi [A] time = 0.22, antiderivative size = 192, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 44, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, Rules used = {794, 664, 621, 204} \begin {gather*} \frac {(2 c d-b e) (-b e g-2 c d g+4 c e f) \tan ^{-1}\left (\frac {e (b+2 c x)}{2 \sqrt {c} \sqrt {d (c d-b e)-b e^2 x-c e^2 x^2}}\right )}{8 c^{3/2} e^2}+\frac {\sqrt {d (c d-b e)-b e^2 x-c e^2 x^2} (-b e g-2 c d g+4 c e f)}{4 c e^2}-\frac {g \left (d (c d-b e)-b e^2 x-c e^2 x^2\right )^{3/2}}{2 c e^2 (d+e x)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 204
Rule 621
Rule 664
Rule 794
Rubi steps
\begin {align*} \int \frac {(f+g x) \sqrt {c d^2-b d e-b e^2 x-c e^2 x^2}}{d+e x} \, dx &=-\frac {g \left (d (c d-b e)-b e^2 x-c e^2 x^2\right )^{3/2}}{2 c e^2 (d+e x)}-\frac {\left (c e^3 f-\left (-c d e^2+b e^3\right ) g+\frac {3}{2} e \left (-2 c e^2 f+b e^2 g\right )\right ) \int \frac {\sqrt {c d^2-b d e-b e^2 x-c e^2 x^2}}{d+e x} \, dx}{2 c e^3}\\ &=\frac {(4 c e f-2 c d g-b e g) \sqrt {d (c d-b e)-b e^2 x-c e^2 x^2}}{4 c e^2}-\frac {g \left (d (c d-b e)-b e^2 x-c e^2 x^2\right )^{3/2}}{2 c e^2 (d+e x)}+\frac {((2 c d-b e) (4 c e f-2 c d g-b e g)) \int \frac {1}{\sqrt {c d^2-b d e-b e^2 x-c e^2 x^2}} \, dx}{8 c e}\\ &=\frac {(4 c e f-2 c d g-b e g) \sqrt {d (c d-b e)-b e^2 x-c e^2 x^2}}{4 c e^2}-\frac {g \left (d (c d-b e)-b e^2 x-c e^2 x^2\right )^{3/2}}{2 c e^2 (d+e x)}+\frac {((2 c d-b e) (4 c e f-2 c d g-b e g)) \operatorname {Subst}\left (\int \frac {1}{-4 c e^2-x^2} \, dx,x,\frac {-b e^2-2 c e^2 x}{\sqrt {c d^2-b d e-b e^2 x-c e^2 x^2}}\right )}{4 c e}\\ &=\frac {(4 c e f-2 c d g-b e g) \sqrt {d (c d-b e)-b e^2 x-c e^2 x^2}}{4 c e^2}-\frac {g \left (d (c d-b e)-b e^2 x-c e^2 x^2\right )^{3/2}}{2 c e^2 (d+e x)}+\frac {(2 c d-b e) (4 c e f-2 c d g-b e g) \tan ^{-1}\left (\frac {e (b+2 c x)}{2 \sqrt {c} \sqrt {d (c d-b e)-b e^2 x-c e^2 x^2}}\right )}{8 c^{3/2} e^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.51, size = 174, normalized size = 0.91 \begin {gather*} \frac {\sqrt {(d+e x) (c (d-e x)-b e)} \left (\sqrt {c} \sqrt {e} (b e g+2 c (-2 d g+2 e f+e g x))+\frac {\sqrt {e (2 c d-b e)} (-b e g-2 c d g+4 c e f) \sin ^{-1}\left (\frac {\sqrt {c} \sqrt {e} \sqrt {d+e x}}{\sqrt {e (2 c d-b e)}}\right )}{\sqrt {d+e x} \sqrt {\frac {b e-c d+c e x}{b e-2 c d}}}\right )}{4 c^{3/2} e^{5/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [A] time = 2.69, size = 312, normalized size = 1.62 \begin {gather*} -\frac {\sqrt {-c e^2} \left (-b^2 e^2 g+4 b c e^2 f+4 c^2 d^2 g-8 c^2 d e f\right ) \log \left (b^2 e^2-8 c x \sqrt {-c e^2} \sqrt {-b d e-b e^2 x+c d^2-c e^2 x^2}-4 b c d e-4 b c e^2 x+4 c^2 d^2-8 c^2 e^2 x^2\right )}{16 c^2 e^3}+\frac {\left (-b^2 e^2 g+4 b c e^2 f+4 c^2 d^2 g-8 c^2 d e f\right ) \tan ^{-1}\left (\frac {\sqrt {c} \left (2 \sqrt {-b d e-b e^2 x+c d^2-c e^2 x^2}-2 x \sqrt {-c e^2}\right )}{b e}\right )}{8 c^{3/2} e^2}+\frac {\sqrt {-b d e-b e^2 x+c d^2-c e^2 x^2} (b e g-4 c d g+4 c e f+2 c e g x)}{4 c e^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.47, size = 395, normalized size = 2.06 \begin {gather*} \left [-\frac {{\left (4 \, {\left (2 \, c^{2} d e - b c e^{2}\right )} f - {\left (4 \, c^{2} d^{2} - b^{2} e^{2}\right )} g\right )} \sqrt {-c} \log \left (8 \, c^{2} e^{2} x^{2} + 8 \, b c e^{2} x - 4 \, c^{2} d^{2} + 4 \, b c d e + b^{2} e^{2} - 4 \, \sqrt {-c e^{2} x^{2} - b e^{2} x + c d^{2} - b d e} {\left (2 \, c e x + b e\right )} \sqrt {-c}\right ) - 4 \, {\left (2 \, c^{2} e g x + 4 \, c^{2} e f - {\left (4 \, c^{2} d - b c e\right )} g\right )} \sqrt {-c e^{2} x^{2} - b e^{2} x + c d^{2} - b d e}}{16 \, c^{2} e^{2}}, -\frac {{\left (4 \, {\left (2 \, c^{2} d e - b c e^{2}\right )} f - {\left (4 \, c^{2} d^{2} - b^{2} e^{2}\right )} g\right )} \sqrt {c} \arctan \left (\frac {\sqrt {-c e^{2} x^{2} - b e^{2} x + c d^{2} - b d e} {\left (2 \, c e x + b e\right )} \sqrt {c}}{2 \, {\left (c^{2} e^{2} x^{2} + b c e^{2} x - c^{2} d^{2} + b c d e\right )}}\right ) - 2 \, {\left (2 \, c^{2} e g x + 4 \, c^{2} e f - {\left (4 \, c^{2} d - b c e\right )} g\right )} \sqrt {-c e^{2} x^{2} - b e^{2} x + c d^{2} - b d e}}{8 \, c^{2} e^{2}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: TypeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.06, size = 697, normalized size = 3.63 \begin {gather*} \frac {b^{2} e g \arctan \left (\frac {\sqrt {c \,e^{2}}\, \left (x +\frac {b}{2 c}\right )}{\sqrt {-c \,e^{2} x^{2}-b \,e^{2} x -b d e +c \,d^{2}}}\right )}{8 \sqrt {c \,e^{2}}\, c}-\frac {b d g \arctan \left (\frac {\sqrt {c \,e^{2}}\, \left (x +\frac {b}{2 c}\right )}{\sqrt {-c \,e^{2} x^{2}-b \,e^{2} x -b d e +c \,d^{2}}}\right )}{2 \sqrt {c \,e^{2}}}+\frac {b d g \arctan \left (\frac {\sqrt {c \,e^{2}}\, \left (x +\frac {d}{e}-\frac {-b \,e^{2}+2 c d e}{2 c \,e^{2}}\right )}{\sqrt {-\left (x +\frac {d}{e}\right )^{2} c \,e^{2}+\left (-b \,e^{2}+2 c d e \right ) \left (x +\frac {d}{e}\right )}}\right )}{2 \sqrt {c \,e^{2}}}-\frac {b e f \arctan \left (\frac {\sqrt {c \,e^{2}}\, \left (x +\frac {d}{e}-\frac {-b \,e^{2}+2 c d e}{2 c \,e^{2}}\right )}{\sqrt {-\left (x +\frac {d}{e}\right )^{2} c \,e^{2}+\left (-b \,e^{2}+2 c d e \right ) \left (x +\frac {d}{e}\right )}}\right )}{2 \sqrt {c \,e^{2}}}+\frac {c \,d^{2} g \arctan \left (\frac {\sqrt {c \,e^{2}}\, \left (x +\frac {b}{2 c}\right )}{\sqrt {-c \,e^{2} x^{2}-b \,e^{2} x -b d e +c \,d^{2}}}\right )}{2 \sqrt {c \,e^{2}}\, e}-\frac {c \,d^{2} g \arctan \left (\frac {\sqrt {c \,e^{2}}\, \left (x +\frac {d}{e}-\frac {-b \,e^{2}+2 c d e}{2 c \,e^{2}}\right )}{\sqrt {-\left (x +\frac {d}{e}\right )^{2} c \,e^{2}+\left (-b \,e^{2}+2 c d e \right ) \left (x +\frac {d}{e}\right )}}\right )}{\sqrt {c \,e^{2}}\, e}+\frac {c d f \arctan \left (\frac {\sqrt {c \,e^{2}}\, \left (x +\frac {d}{e}-\frac {-b \,e^{2}+2 c d e}{2 c \,e^{2}}\right )}{\sqrt {-\left (x +\frac {d}{e}\right )^{2} c \,e^{2}+\left (-b \,e^{2}+2 c d e \right ) \left (x +\frac {d}{e}\right )}}\right )}{\sqrt {c \,e^{2}}}+\frac {\sqrt {-c \,e^{2} x^{2}-b \,e^{2} x -b d e +c \,d^{2}}\, g x}{2 e}+\frac {\sqrt {-c \,e^{2} x^{2}-b \,e^{2} x -b d e +c \,d^{2}}\, b g}{4 c e}-\frac {\sqrt {-\left (x +\frac {d}{e}\right )^{2} c \,e^{2}+\left (-b \,e^{2}+2 c d e \right ) \left (x +\frac {d}{e}\right )}\, d g}{e^{2}}+\frac {\sqrt {-\left (x +\frac {d}{e}\right )^{2} c \,e^{2}+\left (-b \,e^{2}+2 c d e \right ) \left (x +\frac {d}{e}\right )}\, f}{e} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {\left (f+g\,x\right )\,\sqrt {c\,d^2-b\,d\,e-c\,e^2\,x^2-b\,e^2\,x}}{d+e\,x} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\sqrt {- \left (d + e x\right ) \left (b e - c d + c e x\right )} \left (f + g x\right )}{d + e x}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________